package com.ybkj.chat.module.main.activity;

import android.view.View;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.ybkj.chat.R;
import com.ybkj.chat.base.BaseMvpActivity;
import com.ybkj.chat.manager.ActivityManager;
import com.ybkj.chat.ui.adapter.RecomTopicAdapter;
import com.ybkj.chat.ui.view.recyclerview.XRecyclerView;
import com.ybkj.chat.ui.view.refreshlayout.XRefreshLayout;
import com.ybkj.chat.utils.FullScreenUtils;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 推荐话题 4.11
 */

public class RecomTopicActivity extends BaseMvpActivity {
    @BindView(R.id.iv_bg)
    ImageView ivBg;
    @BindView(R.id.back_iv)
    ImageView backIv;
    @BindView(R.id.xrc_recomm)
    XRecyclerView xrcRecomm;
    @BindView(R.id.refresh_recomm)
    XRefreshLayout refreshRecomm;

    private RecomTopicAdapter mRecomTopicAdapter;

    @Override
    protected void injectPresenter() {

    }

    @Override
    protected void initTitle() {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_recom_topic;
    }

    @Override
    protected void initView() {
        FullScreenUtils.fullScreen(mContext);
        initrecycle();
    }


    @Override
    protected void initData() {

    }

    @OnClick({R.id.back_iv, R.id.refresh_recomm})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.back_iv:
                finish();
                break;
            case R.id.refresh_recomm:
                break;
        }
    }

    private void initrecycle() {
        mRecomTopicAdapter = new RecomTopicAdapter(mContext);
        mRecomTopicAdapter.addData("1");
        mRecomTopicAdapter.addData("1");
        mRecomTopicAdapter.addData("1");
        mRecomTopicAdapter.addData("1");
        mRecomTopicAdapter.addData("1");
        xrcRecomm.setAdapter(mRecomTopicAdapter);
        mRecomTopicAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                ActivityManager.gotoActivity(mContext, TopicActivity.class);
            }
        });
    }
}
